package com.j2some;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.RequestGongWuShu.Crane;
import com.RequestGongWuShu.envMonitoring;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.yishun.springboot.Application;
import com.yishun.springboot.dao.CWRServiceTest;
import com.yishun.springboot.httpclient.Post8806;
import com.yishun.springboot.mapper.GwsCWRMapper;
import com.yishun.springboot.mapper.ElectricityMonitoringDetailedMapper;
import com.yishun.springboot.mapper.TspDetailedMapper;
import com.yishun.springboot.mapper.TspGetDataMapper;
import com.yishun.springboot.pojo.ElectricityMonitoringHaveDevCode;
import com.yishun.springboot.pojo.GenOneDataResults;
import com.yishun.springboot.pojo.GeneralRequestModel;
import com.yishun.springboot.pojo.LayminiBaseInfoReturnBeans;
import com.yishun.springboot.pojo.RequestGongWuShuTspBaseInfo;
import com.yishun.springboot.pojo.RequestGongWuShuTspRealTimeData;
import com.yishun.springboot.pojo.TspGetData;
import com.yishun.springboot.pojo.TspHaveDevCode;
import com.yishun.springboot.service.LayminiCAYService;
import com.yishun.springboot.service.LayminiGWSService;

import lombok.extern.slf4j.Slf4j;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
@Slf4j
public class Principal_SeMybatisTestCAY {
	@Autowired
	LayminiCAYService layminiCAYService;

	JSONObject requestBody = new JSONObject();
	JSONObject listParam = new JSONObject();

	// 查询对应tsp设备的最近一条数据记录
	@Test
	public void UpdateCAYTest() {

		listParam.put("ProjectID", "Q440189321");
		listParam.put("Jdbh", "323");
		listParam.put("Dev_GUID", "7afcd8d8-f83b-826 f-52ffe559ac7");
		listParam.put("Dev_UID", "升降机2号");
		listParam.put("Dev_Name", "1#升降机");
		listParam.put("Dev_Model", "xp8190");
		listParam.put("License_SDate", "2016-09-06");
		listParam.put("Com_cqdw", "深圳碧桂园");
		listParam.put("Com_zzs", "三一重工");
		listParam.put("Com_jcs", "null");
		listParam.put("Dev_InDate", "2015-03-05");
		listParam.put("Dev_outDate", "2018-08-09");
		listParam.put("Aqq_ValidDate", "2018-08-09");
		listParam.put("Jc_dev_company", "监测设备厂商");
		listParam.put("Serial_Num", "粤BE-S03981");
		listParam.put(" sub_id", 1231231);

		JSONArray jsonArray = new JSONArray();
		jsonArray.add(listParam);
		requestBody.put("PList", jsonArray);
		JSONObject results = layminiCAYService.uploadEleInfo(requestBody);

	}

}
